<?php

class IndexController extends Core_Controller_Action {
	protected $_style = array ('/styles/style.css' );
	
	public function indexAction() {
		$subCategory = array ();
		$sub_category_id = $this->_getParam ( 'sub_category' );
		$category_id = $this->_getParam ( 'category' );
		
		foreach ( $this->_api->Category->getTopLevel () as $category ) {
			$subCategory ["$category->id"] = $this->_api->Category->findAllSubcategory ( $category->id );
		}
		
		$this->view->categories = $this->_api->Category->getTopLevel ();
		$this->view->lastAuthors = $this->_api->Authors->last ();
		$this->view->lastWorks = $this->_api->Works->last ();
		$this->view->newProd = $this->_api->Product->lastNew ();
		$this->view->subCategories = $subCategory;
		$this->view->isFront = true;
	}
}

